<script type="text/Javascript">
function focususername() {
  if (document.login.email.value == "name@example.com") {
    document.login.email.value = "";
  }
}
function blurusername() {
  if (document.login.email.value == "") {
    document.login.email.value = "name@example.com";
    document.login.sub.value = "Login";
    document.login.sub.disabled = true;
  }
  else {
    var email = document.login.email.value;
    if (email.length >= 10) {
      document.login.sub.value = "Login as " + email.substring(0,10) + " ..";
    }
    else {
      document.login.sub.value = "Login as " + email + "";
    }
  }
}
function focuspassword() {
  if (document.login.password.value == "Password") {
    document.login.password.value = "";
    if (document.login.email.value != "name@example.com") {
      document.login.sub.disabled = false;
    }
  }
}
function blurpassword() {
  if (document.login.password.value == "") {
    document.login.password.value = "Password";
    document.login.sub.disabled = true;
  }
}
</script>

<form action="" method="post" name="login" class="login">
 <p>
    <label for="login">Email:</label>
	<input type="text" value="name@example.com" onFocus="focususername();" onBlur="blurusername();" size="30" name="email" maxlength="100" id="login">
</p>
<p>
    <label for="password">Password:</label>
	<input type="password" value="Password" onFocus="focuspassword();" onBlur="blurpassword();" size="30" name="password"  maxlength="100" id="password">
</p>
<p class="login-submit">
	<button type="submit" class="login-button">Login</button>
</p>
<p class="forgot-password" style="color:#F00"><?php echo $this->error ?></p>
<p class="forgot-password"><a href="../../../../../../public/login/login.phtml">Forgot your password?</a></p>
</form>